import { createRouter, createWebHashHistory } from "vue-router";
export default createRouter({
    history: createWebHashHistory(),
    routes: [
        {
            path: "/",
            redirect: '/login'
        },
        {
            path: "/login",
            component: () => import("../views/login.vue")
        }
        ,
        {
            path: "/admin",
            component: () => import("../views/admin/index.vue"),
            children: [
                {
                    path: "home",
                    component: () => import("../views/admin/home/home.vue")
                },
                {
                    path: "list",
                    component: () => import("../views/admin/banner/list.vue")
                },
                {
                    path: "add",
                    component: () => import("../views/admin/banner/add.vue")
                },
                {
                    path: "shoplist",
                    component: () => import("../views/admin/shopping/list.vue")
                },
                {
                    path: "shoppage",
                    component: () => import("../views/admin/shopping/page.vue")
                }
                ,
                {
                    path: "shopreco",
                    component: () => import("../views/admin/shopping/recommend.vue")
                },
                {
                    path: "adminlist",
                    component: () => import("../views/admin/administrator/adminlist.vue")
                }
                ,
                {
                    path: "adminadd",
                    component: () => import("../views/admin/administrator/adminadd.vue")
                }
                ,
                {
                    path: "edit",
                    component: () => import("../views/admin/administrator/edit.vue")
                }
                ,
                {
                    path: "cart",
                    component: () => import("../views/admin/cart/list.vue")
                }
                ,
                {
                    path: "orderedit",
                    component: () => import("../views/admin/order/edit.vue")
                }
                ,
                {
                    path: "orderlist",
                    component: () => import("../views/admin/order/list.vue")
                }
                ,
                {
                    path: "user",
                    component: () => import("../views/admin/user/userlist.vue")
                }
                ,
                {
                    path: "analyse",
                    component: () => import("../views/admin/analyse/index.vue")
                }
            ]
        }
    ]
})